package cn.wolfcode.wolf2w.elasticsearch.service.impl;

import cn.wolfcode.wolf2w.elasticsearch.domain.StrategyEs;
import cn.wolfcode.wolf2w.elasticsearch.repository.StrategyEsRepository;
import cn.wolfcode.wolf2w.elasticsearch.service.IStrategyEsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.data.mongodb.core.query.Query;
import org.springframework.data.domain.*;

import java.util.List;

@Service
public class StrategyEsServiceImpl implements IStrategyEsService {

    @Autowired
    private StrategyEsRepository strategyEsRepository;
    @Autowired
    private MongoTemplate template;

    @Override
    public void save(StrategyEs strategyEs) {
        strategyEsRepository.save(strategyEs);
    }

  /*  @Override
    public void delete(String id) {
        strategyEsRepository.deleteById(id);
    }

    @Override
    public void update(StrategyEs strategyEs) {
        strategyEsRepository.save(strategyEs);
    }

    @Override
    public StrategyEs get(String id) {
        return strategyEsRepository.findById(id).orElse(null);
    }

    @Override
    public List<StrategyEs> list() {
        return strategyEsRepository.findAll();
    }*/
}
